home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Educ / Higher Ed / G-M / MacPhaseExtras.sit / MacPhase Extras / Macros / LoopTime.m < prev    next >
Encoding:
Text File  |  1994-05-28  |  695 b   |  32 lines  |  [TEXT/DAHN]

  1. macro LoopTime;
  2. var
  3.     boolean : done,inner;
  4.     integer : h,m,s;
  5.     Str255 : startTime, endTime;
  6.     real : pixel;
  7.     longint : x,y;
  8. begin
  9.     NewData('NewData',32,32,0,FALSE);
  10.     GetTime(h,m,s);
  11.     startTime:=concat(h:1,':',m:1,':',s:1);
  12.     y:=0;
  13.     pixel:=9;
  14.     repeat
  15.         inc(y,1);
  16.         x:=3;
  17.         repeat
  18.             inc(x,1);
  19.             GetDataNumber('NewData',x,y,pixel);  {3 seconds}
  20.             inc(pixel,1);
  21.             PutDataNumber('NewData',x,y,pixel);  {  2 seconds }
  22.             inner:=cmp(x,=,9);
  23.         until(inner);
  24.         GetTime(h,m,s);
  25.         done:=cmp(y,=,30);
  26.     until(done);
  27.     PlotData('NewData','Color Contour Plot',TRUE);
  28.     GetTime(h,m,s);
  29.     endTime:=concat(startTime,'  ',h:1,':',m:1,':',s:1);
  30.     ShowInfo('','Loop Time:','Macintosh cx time: 5 seconds',endTime);
  31. end;
  32.